/*
 * Copyright 2011-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0.
 * See `LICENSE` in the project root for license information.
 */

package me.ijleex.mgmt.codegen.boot.autoconfigure;

import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * CodeGenProperties
 *
 * <p>https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/html/configuration-metadata.html#configuration-metadata-annotation-processor</p>
 *
 * @author liym
 * @since 2019-02-28 13:55 新建
 */
@ConfigurationProperties(prefix = "top")
public class CodeGenProperties {

    private final CodeGen codeGen = new CodeGen();

    public CodeGen getCodeGen() {
        return this.codeGen;
    }

    /**
     * 代码生成配置信息
     *
     * @since 2019-02-28 13:56
     */
    public static class CodeGen {

        /**
         * 基本包名
         */
        private String basicPackage;
        /**
         * 作者
         */
        private String author;
        /**
         * 表名前缀，如 t_
         */
        private String tablePrefix;

        /**
         * Velocity 模板与生成的文件的名称的对应关系
         *
         * <p>如：</p>
         */
        private Map<String, String> templates;

        public String getBasicPackage() {
            return basicPackage;
        }

        public void setBasicPackage(String basicPackage) {
            this.basicPackage = basicPackage;
        }

        public String getAuthor() {
            return author;
        }

        public void setAuthor(String author) {
            this.author = author;
        }

        public String getTablePrefix() {
            return tablePrefix;
        }

        public void setTablePrefix(String tablePrefix) {
            this.tablePrefix = tablePrefix;
        }

        public Map<String, String> getTemplates() {
            return templates;
        }

        public void setTemplates(Map<String, String> templates) {
            this.templates = templates;
        }

    }

}
